﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AttachmentListPopup.aspx.vb" Inherits="AttachmentListPopup" %>
 

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script>
        function Deletes(id) {
        }
        function Openfile(filename) {
            
 

window.open('Uploaded/'+filename, '', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no');
        }

    </script>
    <script>
        function DoConfirm(msg)
        {
            var x = confirm(msg);
            document.forms[0].<%=ConfirmBox.ClientID%>.value = x;
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="margin-left:10px;">
      
              <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                CellPadding="1" ForeColor="#333333" Width="300px">
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                           <img src="Images/Icons/<%# GetIcons(Eval("FileType"))%>" />
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                        <HeaderStyle Font-Bold="False" ForeColor="White" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="ชื่อไฟล์">
                                        <ItemTemplate>
                                            <a href="#" onclick="Openfile('<%# Eval("fileName")%>')" > <asp:Label ID="FullName" runat="server" Text='<%# Bind("Title")%>' Width="150px"></asp:Label> </a>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Left" />
                                        <HeaderStyle Font-Bold="False" ForeColor="White" />
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:Label ID="ProjectDocumentID" runat="server" Text='<%# Bind("ID") %>'
                                                Visible="False"></asp:Label>
                                         <asp:ImageButton
                                                    ID="DeleteDocument" runat="server" BorderWidth="1px" BorderStyle="None" ImageUrl="Images/Icons/delete.png"
                                                    OnClientClick="DoConfirm('ยืนยันการลบข้อมูล?')" OnClick="DeleteDocument_Click" />
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                        <HeaderStyle Font-Bold="False" Height="15px" ForeColor="White" />
                                    </asp:TemplateField>
                                </Columns>
                                <RowStyle BackColor="#EFF3FB" />
                                <EditRowStyle BackColor="Gainsboro" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" Font-Bold="True"
                                    Font-Underline="True" />
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" Font-Underline="False" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <AlternatingRowStyle BackColor="White" />
                                <PagerSettings Mode="NumericFirstLast" />
                            </asp:GridView>
             
                <asp:HiddenField ID="ConfirmBox" runat="server" />
  

         
    </div>
    </form>
</body>

</html>
